
var contextPath = null;
function changedCheckBoxState(checkbox, state) {
	var elements = document.getElementsByName(checkbox);
	for (var i = 0; i < elements.length; i++) {
		elements[i].checked = state;
	}
}
function getFormElementByNameValue(name, value) {
	var elements = document.getElementsByName(name);
	for (var i = 0; i < elements.length; i++) {
		if (elements[i].value == value) {
			return elements[i];
		}
	}
	return null;
}
function getCheckBoxByName(name, checked) {
	var result = new Array();
	var index = 0;
	var elements = document.getElementsByName(name);
	for (var i = 0; i < elements.length; i++) {
		if (elements[i].checked) {
			result[index++] = elements[i].value;
		}
	}
	return result;
}
